<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>新闻标签添加页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加创新实践':action=='Modify'?'查看创新实践':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'innovation_practice', 'form': 'dataForm' ,'primary_key':'Innovation_Practice_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">创新实践信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">所属创新机制</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请选择创新机制名称', trigger: 'change' }]"
                prop="Innovation_Mechanism_SerialNumber">
                <el-select disabled @change="handleChange" clearable
                  v-model.trim="dataForm.Innovation_Mechanism_SerialNumber" placeholder="请选择创新机制" filterable
                  style="width: 100%">
                  <el-option v-for="(item,index) in innovation_mechanism" :key="index"
                    :label="item.Innovation_Mechanism_Name" :value="item.Innovation_Mechanism_SerialNumber"></el-option>
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">所属任务</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请选择所属任务', trigger: 'change' }]"
                prop="Innovation_Mechanism_Detail_SerialNumber">
                <el-select disabled @change="handleChange" clearable
                  v-model.trim="dataForm.Innovation_Mechanism_Detail_SerialNumber" placeholder="请选择创新机制" filterable
                  style="width: 100%">
                  <el-option v-for="(item,index) in innovation_mechanism_details" :key="index"
                    :label="item.Innovation_Mechanism_Detail_Name"
                    :value="item.Innovation_Mechanism_Detail_SerialNumber"></el-option>
                </el-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">责任人</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请选择责任人', trigger: 'change' }]" prop="ID_Card_Number">
                <yl-select @change="handlePersonal"
                  :disabled="!dataForm.Innovation_Mechanism_SerialNumber || action=='Modify'"
                  v-model="dataForm.Government_Member_SerialNumber" clearable filterable placeholder="请选择责任人"
                  :options="personal_information"
                  :props="{value:'Government_Member_SerialNumber',label:'Personal_Name'}">
                  <el-table-column prop="Personal_Name" show-overflow-tooltip label="姓名"></el-table-column>
                  <!-- <el-table-column prop="Birthday" show-overflow-tooltip label="出生日期"></el-table-column>
                  <el-table-column prop="Gender" label="性别"></el-table-column>
                  <el-table-column prop="Nation" label="民族"></el-table-column>
                  <el-table-column prop="Registered_Residence" show-overflow-tooltip label="籍贯"></el-table-column> -->
                  <el-table-column prop="Contact_Phone" label="联系方式"></el-table-column>
                  <el-table-column prop="Agensies_Name" label="所属部门"></el-table-column>
                </yl-select>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">行动日期</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请选择行动日期', trigger: 'change' }]" prop="Action_Date">
                <el-date-picker :disabled="action=='Modify'" v-model="dataForm.Action_Date" type="date"
                  placeholder="请选择行动日期" class="borderless-input" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                  size="large" />
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">实践内容</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请输入实践内容', trigger: 'blur' }]" prop="Action_Content">
                <el-input :disabled="action=='Modify'" type="textarea" :autosize="{ minRows: 2}"
                  v-model="dataForm.Action_Content" class="borderless-input" placeholder="请输入实践内容" />
              </el-form-item>
            </el-descriptions-item>
            <!-- <el-descriptions-item>
              <template #label>
                <div class="cell-item">总结</div>
              </template>
              <el-form-item :rules="[{ required: true, message: '请输入总结', trigger: 'blur' }]" prop="Summarize">
                <el-input type="textarea" :autosize="{ minRows: 2}" v-model="dataForm.Summarize"
                  class="borderless-input" placeholder="请输入总结" />
              </el-form-item>
            </el-descriptions-item> -->
            <el-descriptions-item v-if="action=='Add'">
              <template #label>
                <div class="cell-item">附件</div>
              </template>
              <yl-upload ref="ylUpload" drag @success="success" @remove="remove" :limit="99"
                :file="fileList"></yl-upload>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <div class="table_titel" v-if="action == 'Modify'">
          <div class="titel">附件</div>
        </div>
        <el-table id="table" v-if="action == 'Modify'" border max-height="450" tooltip-effect="dark" :data="childDataForm">
          <el-table-column min-width="180" prop="Attachment_SerialNumber" label="附件流水号"></el-table-column>
          <el-table-column min-width="180" prop="Attachment_Name" label="附件名称"></el-table-column>
          <el-table-column min-width="180" prop="Attachment_URL" label="磁盘文件名"></el-table-column>
          <el-table-column width="200" fixed="right" align="center" label="操作">
            <template v-slot="{row}">
              <el-button type="primary" size="small" @click="preview(row)">
                在线预览
              </el-button>
              <el-button type="success" size="small" @click="download(row)">
                下载附件
              </el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div id="ChildTable">
        <el-descriptions
          :data-options="JSON.stringify({'TableName': 'innovation_practice_attachment', 'form': 'childDataForm', 'ParentTableName': 'innovation_mechanism'})">
        </el-descriptions>
      </div>
      <yl-online-preview :file-url="fileUrl" v-model="showDialog"></yl-online-preview>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" v-if="action=='Add'" :loading="loading" plain @click="handleSubmit">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/addsj.js"></script>

</html>